package com.martin.dms.dataservices;

import com.martin.dms.model.Item;

/**
 * Data service for the item entity.
 * 
 * @author mtsvetkov
 */
public interface ItemDataService extends DMSDataService<Item> {

    /**
     * Updates the name of an item.
     * 
     * @param itemId - the id of the item.
     * @param name - the new name.
     */
    public void updateName(long itemId, String name);

    /**
     * Updates the price of an item.
     * 
     * @param itemId - the id of the item.
     * @param price - the new price.
     */
    public void updatePrice(long itemId, int price);

    /**
     * Updates the description of an item.
     * 
     * @param itemId - the id of the item.
     * @param description - the new description.
     */
    public void updateDescription(long itemId, String description);

    /**
     * Updates the image of an item.
     * 
     * @param itemId - the item id.
     * @param image - the new image.
     */
    public void updateImage(long itemId, byte[] image);

    /**
     * Updates the category of an item.
     * 
     * @param itemId - the item id.
     * @param categoryId - the id of the new category.
     */
    public void updateCategory(long itemId, long categoryId);

    /**
     * Updates the amount of items of a certain type.
     * 
     * @param itemId - the it of the item.
     * @param amount - the new amount.
     */
    public void updateAmount(long itemId, int amount);

    /**
     * Adds to an item's amount.
     * 
     * @param itemId - the id of the item.
     * @param toAdd - the amount to add.
     */
    public void addAmount(long itemId, int toAdd);

    /**
     * Removes from an item's amount.
     * 
     * @param itemId - the id of the amount.
     * @param toRemove - the amount to remove.
     */
    public void removeAmount(long itemId, int toRemove);
}
